package com.spzx.channel.controller;

import com.spzx.channel.domain.ItemVo;
import com.spzx.channel.service.IIndexService;
import com.spzx.channel.service.ItemService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * BelongProject: spzx-parent
 * BelongPackage: com.spzx.channel.controller
 * Description:
 *
 * @Author 段鑫涛
 * @Create 2025/5/29 11:20
 * @Version 1.0
 */
@Tag(name = "商品详情接口")
@RestController
@RequestMapping("/item")
public class ItemController extends BaseController {
    @Resource
    private ItemService itemService;

    //首页数据
    @Operation(summary = "商品详情")
    @GetMapping("/{skuId}")
    public AjaxResult index(@PathVariable Long skuId) {
        ItemVo itemVo = itemService.item(skuId);
        return success(itemVo);
    }
}
